package com.dtagri.fjwlw.ui;

import com.dtagri.fjwlw.fragment.AboutFragment;
import com.dtagri.fjwlw.fragment.FeedBackFragment;

/**
 * 简单页面基类枚举
 * 
 * @author wxjn
 * 
 */
public enum ZSimpleBackPage {
	ABOUT(1, "关于我们", AboutFragment.class),

	FEEDBACK(4, "用户反馈", FeedBackFragment.class);

	private Class<?> clz;
	private int value;
	private String title;

	private ZSimpleBackPage(int value, String title, Class<?> clz) {
		this.value = value;
		this.title = title;
		this.clz = clz;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Class<?> getClz() {
		return clz;
	}

	public void setClz(Class<?> clz) {
		this.clz = clz;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public static ZSimpleBackPage getPageByValue(int val) {
		for (ZSimpleBackPage p : values()) {
			if (p.getValue() == val)
				return p;
		}
		return null;
	}
}
